package com.sniff.atp.utils;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.sniff.atp.BaseTest;
import com.sniff.atp.entity.ToolsInfo;
import com.sniff.atp.enums.status.PurchaseAbnormalType;
import com.sniff.atp.manager.impl.ToolsInfoManagerImpl;
import jodd.util.RandomString;
import org.apache.commons.lang3.RandomStringUtils;
import org.testng.annotations.Test;

import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @BelongsProject: sniff-atp
 * @BelongsPackage: com.sniff.atp.utils
 * @Author: zxy
 * @CreateTime: 2023-04-20 14:29
 * @Description:
 * @Version: 1.0
 */
public class testJar extends BaseTest {


    @Test
    public void test(){
//        AdditionDTO additionDTO = new AdditionDTO();
//
//        additionDTO.setAdditionConfigId(12341234);
//        additionDTO.setIngredientsSku("asdfasdfasdf");
//
//
//        Integer additionConfigId = additionDTO.getAdditionConfigId();
//        System.out.println(additionConfigId);
//        String random = RandomStringUtils.random(3, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") + DateUtil.longString();
//        System.out.println(random);

//        long time = new Date().getTime();

//        List<PurchaseAbnormalType> collect = Arrays.stream(PurchaseAbnormalType.values()).filter(purchaseAbnormalType -> {
//            return purchaseAbnormalType.getType() == 1;
//        }).distinct().collect(Collectors.toList());
//
//        PurchaseAbnormalType purchaseAbnormalType = collect.get(0);
//
//        "".substring(4);

    }

}
